import request from '@/utils/request'
export const getpointListApi = (params) => {
  return request({
    url: '/api/vm-service/region/search',
    params
  })
}
// 新增区域
export const getregionApi = (data) => {
  return request({
    url: '/api/vm-service/region',
    method: 'post',
    data
  })
}
// 删除区域
export const deleregionApi = (id) => {
  return request({
    url: `/api/vm-service/region/${id}`,
    method: 'DELETE'
  })
}
// 点位搜索
export const seatchnodeApi = (params) => {
  return request({
    url: 'api/vm-service/node/search',
    params
  })
}
// 点位管理
export const getsearchApi = (params) => {
  return request({
    url: '/api/vm-service/region/search',
    params
  })
}
// 点位管理搜索
export const getchangeApi = (params) => {
  return request({
    url: '/api/vm-service/node/search',
    params
  })
}
// 商圈列表
export const typelistApi = () => {
  return request({
    url: '/api/vm-service/businessType'
  })
}
// 合作商搜索
export const parthnerlist = () => {
  return request({
    url: '/api/user-service/partner/search',
    params: {
      pageSize: 10000
    }
  })
}
// 新增点位
export const adddianweiApi = (data) => {
  return request({
    url: '/api/vm-service/node',
    method: 'post',
    data
  })
}
// 改变点位
export const changedianweiApi = (data, id) => {
  return request({
    url: `/api/vm-service/node/${id}`,
    method: 'PUT',
    data
  })
}
// 删除点位
export const deledianweiApi = (id) => {
  return request({
    url: `/api/vm-service/node/${id}`,
    method: 'DELETE'
  })
}
// 点位详情
export const vmlistApi = (id) => {
  return request({
    url: `/api/vm-service/node/vmList/${id}`
  })
}
// 合作商搜索
export const seatchpartnerApi = () => {
  return request({
    url: '/api/user-service/partner/search'
  })
}
// 销售额统计
export const getCollecApi = (data) => {
  return request({
    url: `/api/order-service/report/amountCollect/${data.collectType}/${data.start}/${data.end}:`
  })
}
